#ifndef FILE_RESTORE_H
#define FILE_RESTORE_H

#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <sstream>
#include<sys/stat.h> 
#include <iconv.h>
#include <list>

#include "Exception.h"
#include  "CommonFunction.cpp"

//#include "format/ext4.cpp";
//#include "format/fat32.cpp";
using namespace std;
extern DiskSector *ds;

typedef struct {
    char *name;
    long parent; 
    short type;    //0 已经删除  1 文件 2 del文件夹 3 文件夹  attr.flags
    long size;
    long postion;
    long long ctime;     //创建时间 
   std::vector<long> child;
} FileInode;

typedef struct {
   long size,itemSize;  // 磁盘总扇区，磁盘簇大小，放弃节点数量 
} DiskInfo;

map <int,string>::iterator typeMap;
//typeMap[3] = "dir";
//typeMap[1] = "file";


#define foreach(container,it) for(typeof((container).begin()) it = (container).begin();it!=(container).end();++it)
#endif